﻿using System;
using System.Collections.Generic;
using System.Text;
using Gallio.Framework;
using MbUnit.Framework;
using MbUnit.Framework.ContractVerifiers;
using MobileBroadbandUserBlog.MBLM.Core.Interfaces;
using MobileBroadbandUserBlog.MBLM.Core.MobileSoftware;

namespace MobileBroadbandLoggingMonitorGUI
{
    [TestFixture]
    public class MobileSoftwareTests
    {
        [Test]
        public void TestHUAWEIMobilePartner()
        {
            IMobileSoftware software = new HUAWEIMobilePartner();
            Assert.IsNotNull(software.GetFileFilterToMonitor());
            Assert.IsNotEmpty(software.GetFileFilterToMonitor());
            Assert.IsNotNull(software.GetFolderToMonitor());
            Assert.IsNotNull(software.GetName());
            Assert.IsNotEmpty(software.GetName());
            Assert.IsNotNull(software.GetSolutionURL());
            Assert.IsNotEmpty(software.GetSolutionURL());
            Assert.IsTrue(software.HasSolution());
        }

        [Test]
        public void TestMWConn()
        {
            IMobileSoftware software = new MWConnSoftware();
            Assert.IsNotNull(software.GetFileFilterToMonitor());
            Assert.IsNotEmpty(software.GetFileFilterToMonitor());
            Assert.IsNotNull(software.GetFolderToMonitor());
            Assert.IsNotNull(software.GetName());
            Assert.IsNotEmpty(software.GetName());
            Assert.IsNotNull(software.GetSolutionURL());
            Assert.IsEmpty(software.GetSolutionURL());
            Assert.IsFalse(software.HasSolution());
        }

        [Test]
        public void TestBirdstepNew()
        {
            IMobileSoftware software = new BirdStepTechnologyEasyConnectNew();
            Assert.IsNotNull(software.GetFileFilterToMonitor());
            Assert.IsNotEmpty(software.GetFileFilterToMonitor());
            Assert.IsNotNull(software.GetFolderToMonitor());
            Assert.IsNotNull(software.GetName());
            Assert.IsNotEmpty(software.GetName());
            Assert.IsNotNull(software.GetSolutionURL());
            Assert.IsNotEmpty(software.GetSolutionURL());
            Assert.IsTrue(software.HasSolution());
        }

        [Test]
        public void TestBirdstepOld()
        {
            IMobileSoftware software = new BirdStepTechnologyEasyConnectOld();
            Assert.IsNotNull(software.GetFileFilterToMonitor());
            Assert.IsNotEmpty(software.GetFileFilterToMonitor());
            Assert.IsNotNull(software.GetFolderToMonitor());
            Assert.IsNotNull(software.GetName());
            Assert.IsNotEmpty(software.GetName());
            Assert.IsNotNull(software.GetSolutionURL());
            Assert.IsNotEmpty(software.GetSolutionURL());
            Assert.IsTrue(software.HasSolution());
        }

        [Test]
        public void TestUserDefined()
        {
            IMobileSoftware software = new UserDefinedSoftware("hamster");
            Assert.IsNotNull(software.GetFileFilterToMonitor());
            Assert.IsNotEmpty(software.GetFileFilterToMonitor());
            Assert.IsNotNull(software.GetFolderToMonitor());
            Assert.IsNotNull(software.GetName());
            Assert.IsNotEmpty(software.GetName());
            Assert.IsTrue(software.IsPresent());

            Assert.IsNotNull(software.GetSolutionURL());
            Assert.IsEmpty(software.GetSolutionURL());
            Assert.IsFalse(software.HasSolution());
        }

    }
}
